using UnityEngine;

public class Edge : MonoBehaviour
{
    GameObject otherobject;
     Transform otherTransfotm;
    new Collider2D collider;
    Vector2 vet2 ;
    private void OnTriggerEnter2D(Collider2D other) {
        if(other.gameObject.tag=="Enemy")
        {
            
           collider = other.GetComponent<Collider2D>();
           otherobject = other.gameObject;
           otherTransfotm = otherobject.transform;

            Invoke("SetTrigger",0.65f);
            //vet2 = otherobject.transform.position;
        }
    }
    private void SetTrigger()
    {
         collider.isTrigger = false;
        //otherTransfotm.position = vet2;
    }
}
